<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<meta charset="UTF-8">
<header th:replace="header::header-fragment"></header>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- 引入页面头header-fragment -->
    <div class="col-md-12 col-sm-12" >
    <div th:replace="header::header-nav"></div>
    </div>
    <!-- 引入工具栏sidebar-fragment -->
    <div class="col-md-2 col-sm-12" style="height: 100%">
    <div th:replace="sidebar::sidebar-fragment(${path})"></div>
    </div>
    <!-- 主界面 -->
    <div class="col-md-10 col-sm-12" style="height: 800px;background-color: #3c763d">
        <table class="table table-hover" >
            <thead>
            <tr>
                <th>编号</th>
                <th>名称</th>
                <th>密码</th>
                <th>年级</th>
                <th>年龄</th>
                <th>邮箱</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody th:each="user:${userList}">
            <tr>
                <!--2.引用thymeleaf语法-->
                <th th:text="${user.id}"></th>
                <th th:text="${user.username}"></th>
                <th th:text="${user.password}"></th>
                <th th:text="${user.gender}"></th>
                <th th:text="${user.age}"></th>
                <th th:text="${user.email}"></th>
                <th>
                    <a th:href="@{'/delete/'+${user.id}}">删除</a>
                    <a th:href="@{'/getById/'+${user.id}}">编辑</a>
                </th>
            </tr>
            </tbody>
        </table>

    </div>
</div>
<!-- jQuery -->
<script th:src="@{/static/js/jquery-3.4.1.min.js}"></script>
<!-- Bootstrap -->
<script src="css/bootstrap/js/bootstrap.min.js" th:src="@{/static/css/bootstrap/js/bootstrap.min.js}"></script>
<link href="css/bootstrap/css/bootstrap.min.css" th:href="@{/static/css/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
</body>
</html>
